package problems;

import java.math.BigInteger;

public class Euler048 extends AbstractEuler {

	@Override
	public Number calculate() {
		BigInteger result = BigInteger.ZERO;
		for (int i = 1; i <= 1000; i++) {
			result = result.add(BigInteger.valueOf(i).pow(i));
		}
		 
		return result.remainder(BigInteger.valueOf(10000000000L)).longValue();
	}

	@Override
	protected Number getCorrectAnswer() {
		return 9110846700L;
	}

}
